package com.example.stringbufferlogger.controller;

import com.example.stringbufferlogger.dto.CompareDTO;
import com.example.stringbufferlogger.entity.LogRecord;
import com.example.stringbufferlogger.entity.QueryCompare;
import com.example.stringbufferlogger.service.CompareDateService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;

@RestController
@RequestMapping("/compare")
public class CompareDateController {

    @Resource
    private CompareDateService compareDateService;

    /**
     * 数据对比
     * @param compareDTO
     * @return
     */
    @PostMapping("/data")
    ResponseEntity<String> dataCompare(@RequestBody CompareDTO compareDTO) {
        return compareDateService.dataCompare(compareDTO);
    }
}
